<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
  <th:block th:include="include :: header('新增学生信息')" />
  <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  <form class="form-horizontal m" id="form-student-add">
    <div class="form-group">
      <label class="col-sm-3 control-label">学生名称：</label>
      <div class="col-sm-8">
        <input name="studentName" class="form-control" type="text">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">年龄：</label>
      <div class="col-sm-8">
        <input name="studentAge" class="form-control" type="text">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">爱好：</label>
      <div class="col-sm-8">
        <input name="studentHobby" class="form-control" type="text">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">性别：</label>
      <div class="col-sm-8">
        <select name="studentSex" class="form-control m-b">
          <option value="">所有</option>
        </select>
        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">状态：</label>
      <div class="col-sm-8">
        <div class="radio-box">
          <input type="radio" name="studentStatus" value="">
          <label th:for="studentStatus" th:text="未知"></label>
        </div>
        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">生日：</label>
      <div class="col-sm-8">
        <div class="input-group date">
          <input name="studentBirthday" class="form-control" placeholder="yyyy-MM-dd" type="text">
          <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
        </div>
      </div>
    </div>
  </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
  var prefix = ctx + "system/student"
  $("#form-student-add").validate({
    focusCleanup: true
  });

  function submitHandler() {
    if ($.validate.form()) {
      $.operate.save(prefix + "/add", $('#form-student-add').serialize());
    }
  }

  $("input[name='studentBirthday']").datetimepicker({
    format: "yyyy-mm-dd",
    minView: "month",
    autoclose: true
  });
</script>
</body>
</html>